﻿//-----------------------------------------------------------------------
// <copyright file="Log4NetLog.cs" company="ET">
//     Copyright Huirui. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Huirui.Cavan.Infrastructure.CrossCutting.NetFramework
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using log4net;

    /// <summary>
    /// log4net log
    /// </summary>
    public class Log4NetLog : ILogger
    {
        #region Members

        /// <summary>
        /// ILog instance
        /// </summary>
        private ILog logger;

        #endregion

        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="Log4NetLog"/> class.
        /// </summary>
        /// <param name="loggerName">Name of the logger.</param>
        public Log4NetLog(string loggerName)
        {
            this.logger = log4net.LogManager.GetLogger(loggerName);
        }

        #endregion

        #region ILogger Members

        /// <summary>
        /// Log debug message
        /// </summary>
        /// <param name="message">The debug message</param>
        /// <param name="args">the message argument values</param>
        public void Debug(string message, params object[] args)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Log debug message
        /// </summary>
        /// <param name="message">The message</param>
        /// <param name="exception">Exception to write in debug message</param>
        /// <param name="args">The args.</param>
        public void Debug(string message, Exception exception, params object[] args)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Log debug message
        /// </summary>
        /// <param name="item">The item with information to write in debug</param>
        public void Debug(object item)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Log FATAL error
        /// </summary>
        /// <param name="message">The message of fatal error</param>
        /// <param name="args">The argument values of message</param>
        public void Fatal(string message, params object[] args)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// log FATAL error
        /// </summary>
        /// <param name="message">The message of fatal error</param>
        /// <param name="exception">The exception to write in this fatal message</param>
        /// <param name="args">The args.</param>
        public void Fatal(string message, Exception exception, params object[] args)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Log message information
        /// </summary>
        /// <param name="message">The information message to write</param>
        /// <param name="args">The arguments values</param>
        public void LogInfo(string message, params object[] args)
        {
            this.logger.Info(message);
        }

        /// <summary>
        /// Log warning message
        /// </summary>
        /// <param name="message">The warning message to write</param>
        /// <param name="args">The argument values</param>
        public void LogWarning(string message, params object[] args)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Log error message
        /// </summary>
        /// <param name="message">The error message to write</param>
        /// <param name="args">The arguments values</param>
        public void LogError(string message, params object[] args)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Log error message
        /// </summary>
        /// <param name="message">The error message to write</param>
        /// <param name="exception">The exception associated with this error</param>
        /// <param name="args">The arguments values</param>
        public void LogError(string message, Exception exception, params object[] args)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
